package com.sx.gongzhong.pest;

import com.sx.gongzhong.model.HeadParamBean;
import com.sx.gongzhong.model.ReplyUserBean;
import com.sx.gongzhong.net.BaseCallBack;
import com.sx.gongzhong.net.HelpManager;
import com.sx.gongzhong.view.IVoidView;

import java.util.Map;

/**采纳
 * Created by admin on 2018/1/13.
 */

public class AdoptPest {
    private IVoidView booleanView;

    public AdoptPest(IVoidView booleanView) {
        this.booleanView = booleanView;
    }

    public void adoptCommon(String id) {
        Map<String,Object> map = HeadParamBean.getHead();
        map.put("replyId",id);
        new HelpManager().adoptComment(map, new BaseCallBack<ReplyUserBean.BaseResult<Boolean>>() {
            @Override
            public void onSuccess(ReplyUserBean.BaseResult<Boolean> response) {
                booleanView.voidView("采纳成功");
            }
            @Override
            public void onFailures(String message) {
                booleanView.showError(message);
            }
        });
    }
}
